package org.timeticker;

import junit.framework.TestCase;

import java.util.Calendar;
import java.util.Locale;

/**
 * Date Unit Test
 *
 * @author Ivan Latysh
 * @version 0.1
 * @since 25-Aug-2007 : 6:23:30 PM
 */
public class DayUTest extends TestCase {

  Day day;

  public void testContructors() {
    // create a new calendar
    Calendar cal = Calendar.getInstance(Locale.getDefault());
    // create a new day
    day = new Day();
    assertNotNull(day);
    // set calendar time
    cal.setTimeInMillis(day.getTime());
    // check and make sure that it has no time portion
    assertEquals(0, cal.get(Calendar.MILLISECOND));
    assertEquals(0, cal.get(Calendar.SECOND));
    assertEquals(0, cal.get(Calendar.MINUTE));
    assertEquals(0, cal.get(Calendar.HOUR));

  }

}
